// map函数
(() => {
  let arr = [1, 3, 2, 2];
  result = [];
  let arr__ = arr.map((item, index, result) => {
    return item + "--->" + index + '';
  });
  console.log("map函数", arr__, result);
})();

// reduce函数
(() => {
  let arr = [1, 3, 2, 2];
  let arr__ = arr.reduce((arr, cur) => {
    return arr + cur;
  });
  console.log('reduce函数', arr__);
})();

